<?php

// generate some random data
srand((double)microtime()*1000000);

//
// NOTE: how we are filling 3 arrays full of data,
//       one for each line on the graph
//
$data_1 = array();
$data_2 = array();
$data_3 = array();
for( $i=0; $i<9; $i++ )
{
  $data_1[] = rand(2,5);
  $data_2[] = rand(4,7);
  $data_3[] = rand(5,9);
}

include_once( 'php-ofc-library/open-flash-chart.php' );
$g = new graph();
$g->title( 'Mixed Line and Bar Charts', '{font-size: 35px; color: #FF0000;}' );

$g->set_data( $data_1 );
$g->bar( 50, '#9933CC', 'Purple Bar', 10 );

$g->set_data( $data_2 );
$g->bar( 100, '#339933', 'Green Bar', 10 );

$g->set_data( $data_3 );
$g->line_dot( 3, 5, '#CC3399', 'Line', 10 );    // <-- 3px thick + dots

$g->set_x_labels( array( 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep' ) );
$g->set_y_max( 10 );
$g->y_label_steps( 5 );
$g->set_y_legend( 'Your legend here!', 12, '#736AFF' );
echo $g->render();
?>
